import Style from "./style";

export interface Attribute {
  name: string;
  value: any;
}

export interface TextNode {
  type: "text";
  content: string;
}

export interface style {
  key: string;
  value: string;
  specificity: Array<number>;
}

export interface Node {
  type: string;
  tagName?: string;
  children?: Array<Node | TextNode>;
  attributes?: Attribute[];
  computedStyle?: Array<style>; // 新增样式属性
  style?: Style;
  parent?: Node;
}
